package com.derbysoft.ota.infrastructure.springws.soap.server.endpoint;

import javax.xml.namespace.QName;

import org.springframework.ws.soap.server.endpoint.SoapFaultDefinition;

public abstract class SoapFaultDefinitions {

	public static SoapFaultDefinition clientFaultOf(String faultStringOrReason) {
		return of(SoapFaultDefinition.CLIENT, faultStringOrReason);
	}

	public static SoapFaultDefinition of(QName faultCode, String faultStringOrReason) {
		SoapFaultDefinition definition = new SoapFaultDefinition();
		definition.setFaultCode(faultCode);
		definition.setFaultStringOrReason(faultStringOrReason);
		return definition;
	}

}
